package com.zerotwo.exam.user.utils;

import static com.zerotwo.exam.common.core.base.RedisKeyConstants.REDIS_COURSE_CLASS_CODE_KEY;


/**
 * @author 02
 * @version 1.0
 * @Date 2024/7/5
 * @Description 班级码reids规则
 */
public class ClassCodeRedisKeys {
    public static String getClassKey(int classId){
        return baseKey("class_List")+":"+classId;
    }
    public static String getCodeKey(String code){
        return baseKey("code_list")+":"+code;
    }
    public static String getCodeListKey(){
        return baseKey("codes");
    }
    public static String getGenerateFlagKey(){
        return baseKey("generate_flag");
    }
    public static String getGroupValueKey(){
        return baseKey("group_value");
    }
    private static String baseKey(String key){
        return REDIS_COURSE_CLASS_CODE_KEY+":"+key;
    }
}
